﻿using System;
using Microsoft.Xna.Framework;

namespace MaterialEditor
{
    /// <summary>
    /// Stores rotation information
    /// </summary>
    public class Rotate : IEffect
    {
        public float rotation;

        public Vector2 Value
        {
            get { return new Vector2(rotation, 0.0f); }
        }

        public Matrix Transform
        {
            get { return Matrix.CreateTranslation(new Vector3(-0.5f, -0.5f, 0.0f)) * Matrix.CreateRotationZ(rotation) * Matrix.CreateTranslation(new Vector3(0.5f, 0.5f, 0.0f)); }
        }

        public IEffect Clone()
        {
            Rotate outval = new Rotate();
            outval.rotation = rotation;

            return outval;
        }


        public Microsoft.Xna.Framework.Graphics.Effect effect
        {
            get { return null; }
        }


        public Microsoft.Xna.Framework.Graphics.Texture2D[] textures
        {
            get { return null; }
        }
    }
}